library(dplyr)
library(tidyverse)
library(knitr)
library(plotly)
library(kableExtra)The primary greenhouse gases in Earth’s atmosphere are water vapor (H2O), carbon dioxide (CO2), methane (CH4), nitrous oxide (N2O) and ozone (O3).
-Carbon dioxide (CO2):
-Methane (CH4):
-Nitrous oxide (N2O):
-Fluorinated gases:
GHGs warm the earth by absorbing energy and slowing the rate at which the energy escapes to space. Different GHGs can have different effects on the earth’s warming depending on their ability to absorb energy (radiative efficiency) and how long they stay in the atmosphere (lifetime).
The Global Warming Potential was developed to allow comparisons of the global warming impacts of different gases. It is a measure of how much energy the emission of 1 ton of a gas will absorb over a given period of time, relative to the emissions of 1 ton of carbon dioxide. The larger the GWP, the more that given gas warms the earth compared to CO2 over that time period (usually 100 years). GWP provides a common unit of measure which allows analysts to add up emissions estimates of different gases (e.g., to compile a national GHG inventory), and allows policymakers to compare emissions reduction opportunities across sectors.
CO2, by definition, has a GWP of 1 regardless of the time period used since it is the gas used as the reference. CO2 emissions cause an increase in the atmospheric concentrations that will least thousands of years.
Methane (CH4) is estimated to have a GWP of 28-36 over 100 years. CH4 emitted today lasts about a decade on average, which is much less time thanCO2. But CH4 absorbs much more energy than CO2.
Nitrous Oxide (N2O) has a GWP 265-298 times that of CO2 for a 100-year timescale. BO2 emitted today remains in the atmosphere for more than 100 years, on average.
Fluorinated gases are high-GWP gases because, for a given amount of mass, they trap substantially more than CO2. The GWPs for these gases can be in the thousands or tens of thousands.
A carbon budget is an upper limit of total CO2 emissions associated with remaining below a specific global average - temperature.
Global emissions budgets are calculated according to historical cumulative emissions from fossil, industrial processes, and land use change, but vary according to the global temperature target that is chosen, the probability of staying below that target, and the emissions of other non CO2 greenhouse gases.
Emissions budgets are relevant to climate change mitigation because they indicate a finite amount of carbon dioxide that can be emitted over time, before resulting in dangerous levels of global warming.
The UNFCCC is an international environmental treaty addressing climate change, negotiated by 154 states at tht United Nations Conference on Environment and Development, informally known as the Earth Summit, held in Rio de Janiero in 1992.
Objectives:
Parties:
The Convention divides countries into three main groups according to differing commitments. Here is the description of these categories (source).
-*Annex I* Parties include the Industrialized countries that were members of the OECD (Organization for Economic Co-operation and Development) in 1992, plus countries with economies in transition (the EIT parties), including the Russian Federation, the Baltic States, and several Central and Eastern European States.
-*Annex II* Parties consist of the OECD members of Annex I, but not the EIT Parties. They are required to provide financial resources to enable developing countries to undertake emissions reduction activities under the Convention and to help them adapt to adverse effects of climate change.
- *Non-Annex I* Parties are mostly developing countries. Certain groups of developing countries are recognized by the Convention as being especially vulnerable to the adverse impacts of climate change, including countries with low-lying coastal areas and those prone to desertification and drought. Others (such as countries that rely heavily on income from fossil fuel production and commerce) feel more vulnerable to the potential economic impacts of climate change response measures.
CAIT Historic allow for easy access, analysis and visualization of the latest available international greenhouse gas emissions data. It includes information for 191 countries and the European Union, 50 U.S. states, 6 gases, multiple economic sectors, and 160 years - carbon dioxide emissions for 1850-2014 and multi-sector greenhouse gas emission for 1990-2014.
More description is available here
Data collection:
Total greenhouse gas emissions (kt of CO2 equivalent)
library(WDI)
#get datasets on emissions
datasets = WDIsearch("emissions")
# get Total greenhouse gas emissions (kt of CO2 equivalent)
ghg_emissions_wb = WDI(indicator='EN.ATM.GHGT.KT.CE')
# get all world data
ghg_emissions_wb_world = ghg_emissions_wb %>%
filter(country == "World")
# Show data sample
ghg_emissions_wb_world %>%
top_n(10) %>%
kable() %>%
kable_styling(bootstrap_options = c("striped", "hover"), full_width = F, font_size = 13) %>%
scroll_box(width = "100%", height = "400px")| iso2c | country | EN.ATM.GHGT.KT.CE | year |
|---|---|---|---|
| 1W | World | NA | 2020 |
| 1W | World | NA | 2019 |
| 1W | World | NA | 2018 |
| 1W | World | NA | 2017 |
| 1W | World | NA | 2016 |
| 1W | World | NA | 2015 |
| 1W | World | NA | 2014 |
| 1W | World | NA | 2013 |
| 1W | World | 53526303 | 2012 |
| 1W | World | 52790527 | 2011 |
# plot world GHG emissions
ghg_emissions_wb_world %>%
plot_ly() %>%
add_trace(y = ~EN.ATM.GHGT.KT.CE,
x = ~year,
marker = list(color = "gray"),
type = 'scatter',
# type = "line",
mode = 'lines+markers',
orientation = "v") %>%
layout(title = "World GHG emissions (source: WorldBank)",
yaxis = list(title = "GHG emissions"),
xaxis = list(title = "Years"))# load data
ghg_emissions_wri = read.csv("https://raw.githubusercontent.com/OpenGeoScales/CarbonData/feature-article/datasets/raw/wri/historical_emissions/historical_emissions.csv",
encoding = "UTF-8")| Column | Description |
|---|---|
| Country | The country name |
| Data.source | Five data sources: CAIT, PIK, GCP, UNFCCC_AI, UNFCCC_NAI |
| Sector | 30 categories of sectors: Total including LUCF,Total excluding LUCF, Total fossil fuels and cement, Electricity/Heat, Coal, Oil… |
| Gas | 8 categories of sectors: All GHG,KYOTOGHG, CO2, Aggregate GHGs, CH4, N2O, F-Gas , Aggregate F-gases |
| Unit | One unit: MtCO₂e |
| 1850 | Emission quantity in 1850 |
| 1851 | Emission quantity in 1850 |
| .. | Emission quantity in 1851 |
| 2019 | Emission quantity in 2019 |
# get sectors from different data sources
sector_CAIT = ghg_emissions_wri %>%
filter(Data.source == "CAIT") %>%
distinct(Sector) %>%
select(Sector.CAIT = Sector) %>%
arrange(Sector.CAIT)
sector_PIK = ghg_emissions_wri %>%
# select PIK datasource
filter(Data.source == "PIK") %>%
distinct(Sector) %>%
select(Sector.PIK = Sector) %>%
arrange(Sector.PIK)
sector_GCP = ghg_emissions_wri %>%
# select GCP datasource
filter(Data.source == "GCP") %>%
distinct(Sector) %>%
select(Sector.GCP = Sector) %>%
arrange(Sector.GCP)
sector_UNFCCC_AI = ghg_emissions_wri %>%
# select UNFCCC_AI datasource
filter(Data.source == "UNFCCC_AI") %>%
distinct(Sector) %>%
select(Sector.UNFCCC_AI = Sector) %>%
arrange(Sector.UNFCCC_AI)
sector_UNFCCC_NAI = ghg_emissions_wri %>%
# select UNFCCC_NAI datasource
filter(Data.source == "UNFCCC_NAI") %>%
distinct(Sector) %>%
select(Sector.UNFCCC_NAI = Sector) %>%
arrange(Sector.UNFCCC_NAI)
# plot table
knitr::kable(list(sector_CAIT, sector_PIK, sector_GCP, sector_UNFCCC_AI, sector_UNFCCC_NAI)) %>%
kable_styling(bootstrap_options = c("striped", "hover"), full_width = F, font_size = 12) %>%
scroll_box(width = "100%", height = "200px")
|
|
|
|
|
# get gas from different data sources
gas_CAIT = ghg_emissions_wri %>%
filter(Data.source == "CAIT") %>%
distinct(Gas) %>%
select(Gas.CAIT = Gas) %>%
arrange(Gas.CAIT)
gas_PIK = ghg_emissions_wri %>%
# select PIK datasource
filter(Data.source == "PIK") %>%
distinct(Gas) %>%
select(Gas.PIK = Gas) %>%
arrange(Gas.PIK)
gas_GCP = ghg_emissions_wri %>%
# select GCP datasource
filter(Data.source == "GCP") %>%
distinct(Gas) %>%
select(Gas.GCP = Gas) %>%
arrange(Gas.GCP)
gas_UNFCCC_AI = ghg_emissions_wri %>%
# select UNFCCC_AI datasource
filter(Data.source == "UNFCCC_AI") %>%
distinct(Gas) %>%
select(Gas.UNFCCC_AI = Gas) %>%
arrange(Gas.UNFCCC_AI)
gas_UNFCCC_NAI = ghg_emissions_wri %>%
# select UNFCCC_NAI datasource
filter(Data.source == "UNFCCC_NAI") %>%
distinct(Gas) %>%
select(Gas.UNFCCC_NAI = Gas) %>%
arrange(Gas.UNFCCC_NAI)
# plot table
knitr::kable(list(gas_CAIT, gas_PIK, gas_GCP, gas_UNFCCC_AI, gas_UNFCCC_NAI)) %>%
kable_styling(bootstrap_options = c("striped", "hover"), full_width = F, font_size = 12) %>%
scroll_box(width = "100%", height = "200px")
|
|
|
|
|
ghg_emissions_wri %>%
group_by(Data.source) %>%
summarise(Nb.Country=length(unique(Country))) %>%
kable() %>%
kable_styling(bootstrap_options = c("striped", "hover"), full_width = F, font_size = 13) | Data.source | Nb.Country |
|---|---|
| CAIT | 195 |
| GCP | 196 |
| PIK | 216 |
| UNFCCC_AI | 45 |
| UNFCCC_NAI | 148 |
CAIT data source contains data for 193 distinct countries (all countries that are member states of the United Nations) with aggregated data on world scale (World) and European Union (European Union (27))
GCP data source contains data for the 193 countries members states of the United Nations plus the state of Palestine and aggregated data on world scale (World) and European Union (European Union (27))
PIK data source contains data for the 193 countries members states of the United Nations in addition to aggregated data on groups of countries such as: Umbrella Group, Least Developed Countries, Non-Annex-I Parties to the Convention, Annex-I Parties to the Convention…
UNFCCC Annex I data source contains data for 43 countries members of the Annex I convention with aggregated data on belonging parties (Annex-I Parties to the Convention) and European Union scale (European Union (27)).
UNFCCC Non-Annex I data source contains data for 148 countries that are parts of the non-Annex I convention.
CAIT Historic allow for easy access, analysis and visualization of the latest available international greenhouse gas emissions data. It includes information for 191 countries and the European Union, 50 U.S. states, 6 gases, multiple economic sectors, and 160 years - carbon dioxide emissions for 1850-2014 and multi-sector greenhouse gas emission for 1990-2014.
More description is available here
All CAIT data carries a Creative Commons Attribution-NonCommercial 4.0 International license. This means CAIT data and analysis can be used in non-commercial applications, provided clear attribution to WRI/CAIT is given. Additionally to citing CAIT it is recommanded consider citing the data sources that CAIT is using.
CAIT 2.0 UNFCCC data derives directly from United Nations Framework Convention on Climate Change (UNFCCC) Secretariat. Additionally to citing CAIT 2.0 please consider citing UNFCCC data source that CAIT 2.0 is using: United Nations Framework Convention on Climate Change (UNFCCC) Secretariat. 2013. “Time Series – Annex I.” Bonn: UNFCCC.
# data processing
ghg_emissions_wri_CAIT = ghg_emissions_wri %>%
# select all world data & all gases data & total sector
filter(Data.source == "CAIT",
Country == "World",
Gas == "All GHG",
Sector == "Total including LUCF") %>%
# pivot data
pivot_longer(
cols = starts_with("X"),
names_to = "year",
names_prefix = "X",
values_to = "value") %>%
mutate_at("year" , as.numeric) %>%
arrange(year)
# plot table
ghg_emissions_wri_CAIT %>%
kable() %>%
kable_styling(bootstrap_options = c("striped", "hover"), full_width = F, font_size = 13) %>%
scroll_box(width = "100%", height = "200px")| Country | Data.source | Sector | Gas | Unit | year | value |
|---|---|---|---|---|---|---|
| World | CAIT | Total including LUCF | All GHG | MtCO2e | 1850 | N/A |
| World | CAIT | Total including LUCF | All GHG | MtCO2e | 1851 | N/A |
| World | CAIT | Total including LUCF | All GHG | MtCO2e | 1852 | N/A |
| World | CAIT | Total including LUCF | All GHG | MtCO2e | 1853 | N/A |
| World | CAIT | Total including LUCF | All GHG | MtCO2e | 1854 | N/A |
| World | CAIT | Total including LUCF | All GHG | MtCO2e | 1855 | N/A |
| World | CAIT | Total including LUCF | All GHG | MtCO2e | 1856 | N/A |
| World | CAIT | Total including LUCF | All GHG | MtCO2e | 1857 | N/A |
| World | CAIT | Total including LUCF | All GHG | MtCO2e | 1858 | N/A |
| World | CAIT | Total including LUCF | All GHG | MtCO2e | 1859 | N/A |
| World | CAIT | Total including LUCF | All GHG | MtCO2e | 1860 | N/A |
| World | CAIT | Total including LUCF | All GHG | MtCO2e | 1861 | N/A |
| World | CAIT | Total including LUCF | All GHG | MtCO2e | 1862 | N/A |
| World | CAIT | Total including LUCF | All GHG | MtCO2e | 1863 | N/A |
| World | CAIT | Total including LUCF | All GHG | MtCO2e | 1864 | N/A |
| World | CAIT | Total including LUCF | All GHG | MtCO2e | 1865 | N/A |
| World | CAIT | Total including LUCF | All GHG | MtCO2e | 1866 | N/A |
| World | CAIT | Total including LUCF | All GHG | MtCO2e | 1867 | N/A |
| World | CAIT | Total including LUCF | All GHG | MtCO2e | 1868 | N/A |
| World | CAIT | Total including LUCF | All GHG | MtCO2e | 1869 | N/A |
| World | CAIT | Total including LUCF | All GHG | MtCO2e | 1870 | N/A |
| World | CAIT | Total including LUCF | All GHG | MtCO2e | 1871 | N/A |
| World | CAIT | Total including LUCF | All GHG | MtCO2e | 1872 | N/A |
| World | CAIT | Total including LUCF | All GHG | MtCO2e | 1873 | N/A |
| World | CAIT | Total including LUCF | All GHG | MtCO2e | 1874 | N/A |
| World | CAIT | Total including LUCF | All GHG | MtCO2e | 1875 | N/A |
| World | CAIT | Total including LUCF | All GHG | MtCO2e | 1876 | N/A |
| World | CAIT | Total including LUCF | All GHG | MtCO2e | 1877 | N/A |
| World | CAIT | Total including LUCF | All GHG | MtCO2e | 1878 | N/A |
| World | CAIT | Total including LUCF | All GHG | MtCO2e | 1879 | N/A |
| World | CAIT | Total including LUCF | All GHG | MtCO2e | 1880 | N/A |
| World | CAIT | Total including LUCF | All GHG | MtCO2e | 1881 | N/A |
| World | CAIT | Total including LUCF | All GHG | MtCO2e | 1882 | N/A |
| World | CAIT | Total including LUCF | All GHG | MtCO2e | 1883 | N/A |
| World | CAIT | Total including LUCF | All GHG | MtCO2e | 1884 | N/A |
| World | CAIT | Total including LUCF | All GHG | MtCO2e | 1885 | N/A |
| World | CAIT | Total including LUCF | All GHG | MtCO2e | 1886 | N/A |
| World | CAIT | Total including LUCF | All GHG | MtCO2e | 1887 | N/A |
| World | CAIT | Total including LUCF | All GHG | MtCO2e | 1888 | N/A |
| World | CAIT | Total including LUCF | All GHG | MtCO2e | 1889 | N/A |
| World | CAIT | Total including LUCF | All GHG | MtCO2e | 1890 | N/A |
| World | CAIT | Total including LUCF | All GHG | MtCO2e | 1891 | N/A |
| World | CAIT | Total including LUCF | All GHG | MtCO2e | 1892 | N/A |
| World | CAIT | Total including LUCF | All GHG | MtCO2e | 1893 | N/A |
| World | CAIT | Total including LUCF | All GHG | MtCO2e | 1894 | N/A |
| World | CAIT | Total including LUCF | All GHG | MtCO2e | 1895 | N/A |
| World | CAIT | Total including LUCF | All GHG | MtCO2e | 1896 | N/A |
| World | CAIT | Total including LUCF | All GHG | MtCO2e | 1897 | N/A |
| World | CAIT | Total including LUCF | All GHG | MtCO2e | 1898 | N/A |
| World | CAIT | Total including LUCF | All GHG | MtCO2e | 1899 | N/A |
| World | CAIT | Total including LUCF | All GHG | MtCO2e | 1900 | N/A |
| World | CAIT | Total including LUCF | All GHG | MtCO2e | 1901 | N/A |
| World | CAIT | Total including LUCF | All GHG | MtCO2e | 1902 | N/A |
| World | CAIT | Total including LUCF | All GHG | MtCO2e | 1903 | N/A |
| World | CAIT | Total including LUCF | All GHG | MtCO2e | 1904 | N/A |
| World | CAIT | Total including LUCF | All GHG | MtCO2e | 1905 | N/A |
| World | CAIT | Total including LUCF | All GHG | MtCO2e | 1906 | N/A |
| World | CAIT | Total including LUCF | All GHG | MtCO2e | 1907 | N/A |
| World | CAIT | Total including LUCF | All GHG | MtCO2e | 1908 | N/A |
| World | CAIT | Total including LUCF | All GHG | MtCO2e | 1909 | N/A |
| World | CAIT | Total including LUCF | All GHG | MtCO2e | 1910 | N/A |
| World | CAIT | Total including LUCF | All GHG | MtCO2e | 1911 | N/A |
| World | CAIT | Total including LUCF | All GHG | MtCO2e | 1912 | N/A |
| World | CAIT | Total including LUCF | All GHG | MtCO2e | 1913 | N/A |
| World | CAIT | Total including LUCF | All GHG | MtCO2e | 1914 | N/A |
| World | CAIT | Total including LUCF | All GHG | MtCO2e | 1915 | N/A |
| World | CAIT | Total including LUCF | All GHG | MtCO2e | 1916 | N/A |
| World | CAIT | Total including LUCF | All GHG | MtCO2e | 1917 | N/A |
| World | CAIT | Total including LUCF | All GHG | MtCO2e | 1918 | N/A |
| World | CAIT | Total including LUCF | All GHG | MtCO2e | 1919 | N/A |
| World | CAIT | Total including LUCF | All GHG | MtCO2e | 1920 | N/A |
| World | CAIT | Total including LUCF | All GHG | MtCO2e | 1921 | N/A |
| World | CAIT | Total including LUCF | All GHG | MtCO2e | 1922 | N/A |
| World | CAIT | Total including LUCF | All GHG | MtCO2e | 1923 | N/A |
| World | CAIT | Total including LUCF | All GHG | MtCO2e | 1924 | N/A |
| World | CAIT | Total including LUCF | All GHG | MtCO2e | 1925 | N/A |
| World | CAIT | Total including LUCF | All GHG | MtCO2e | 1926 | N/A |
| World | CAIT | Total including LUCF | All GHG | MtCO2e | 1927 | N/A |
| World | CAIT | Total including LUCF | All GHG | MtCO2e | 1928 | N/A |
| World | CAIT | Total including LUCF | All GHG | MtCO2e | 1929 | N/A |
| World | CAIT | Total including LUCF | All GHG | MtCO2e | 1930 | N/A |
| World | CAIT | Total including LUCF | All GHG | MtCO2e | 1931 | N/A |
| World | CAIT | Total including LUCF | All GHG | MtCO2e | 1932 | N/A |
| World | CAIT | Total including LUCF | All GHG | MtCO2e | 1933 | N/A |
| World | CAIT | Total including LUCF | All GHG | MtCO2e | 1934 | N/A |
| World | CAIT | Total including LUCF | All GHG | MtCO2e | 1935 | N/A |
| World | CAIT | Total including LUCF | All GHG | MtCO2e | 1936 | N/A |
| World | CAIT | Total including LUCF | All GHG | MtCO2e | 1937 | N/A |
| World | CAIT | Total including LUCF | All GHG | MtCO2e | 1938 | N/A |
| World | CAIT | Total including LUCF | All GHG | MtCO2e | 1939 | N/A |
| World | CAIT | Total including LUCF | All GHG | MtCO2e | 1940 | N/A |
| World | CAIT | Total including LUCF | All GHG | MtCO2e | 1941 | N/A |
| World | CAIT | Total including LUCF | All GHG | MtCO2e | 1942 | N/A |
| World | CAIT | Total including LUCF | All GHG | MtCO2e | 1943 | N/A |
| World | CAIT | Total including LUCF | All GHG | MtCO2e | 1944 | N/A |
| World | CAIT | Total including LUCF | All GHG | MtCO2e | 1945 | N/A |
| World | CAIT | Total including LUCF | All GHG | MtCO2e | 1946 | N/A |
| World | CAIT | Total including LUCF | All GHG | MtCO2e | 1947 | N/A |
| World | CAIT | Total including LUCF | All GHG | MtCO2e | 1948 | N/A |
| World | CAIT | Total including LUCF | All GHG | MtCO2e | 1949 | N/A |
| World | CAIT | Total including LUCF | All GHG | MtCO2e | 1950 | N/A |
| World | CAIT | Total including LUCF | All GHG | MtCO2e | 1951 | N/A |
| World | CAIT | Total including LUCF | All GHG | MtCO2e | 1952 | N/A |
| World | CAIT | Total including LUCF | All GHG | MtCO2e | 1953 | N/A |
| World | CAIT | Total including LUCF | All GHG | MtCO2e | 1954 | N/A |
| World | CAIT | Total including LUCF | All GHG | MtCO2e | 1955 | N/A |
| World | CAIT | Total including LUCF | All GHG | MtCO2e | 1956 | N/A |
| World | CAIT | Total including LUCF | All GHG | MtCO2e | 1957 | N/A |
| World | CAIT | Total including LUCF | All GHG | MtCO2e | 1958 | N/A |
| World | CAIT | Total including LUCF | All GHG | MtCO2e | 1959 | N/A |
| World | CAIT | Total including LUCF | All GHG | MtCO2e | 1960 | N/A |
| World | CAIT | Total including LUCF | All GHG | MtCO2e | 1961 | N/A |
| World | CAIT | Total including LUCF | All GHG | MtCO2e | 1962 | N/A |
| World | CAIT | Total including LUCF | All GHG | MtCO2e | 1963 | N/A |
| World | CAIT | Total including LUCF | All GHG | MtCO2e | 1964 | N/A |
| World | CAIT | Total including LUCF | All GHG | MtCO2e | 1965 | N/A |
| World | CAIT | Total including LUCF | All GHG | MtCO2e | 1966 | N/A |
| World | CAIT | Total including LUCF | All GHG | MtCO2e | 1967 | N/A |
| World | CAIT | Total including LUCF | All GHG | MtCO2e | 1968 | N/A |
| World | CAIT | Total including LUCF | All GHG | MtCO2e | 1969 | N/A |
| World | CAIT | Total including LUCF | All GHG | MtCO2e | 1970 | N/A |
| World | CAIT | Total including LUCF | All GHG | MtCO2e | 1971 | N/A |
| World | CAIT | Total including LUCF | All GHG | MtCO2e | 1972 | N/A |
| World | CAIT | Total including LUCF | All GHG | MtCO2e | 1973 | N/A |
| World | CAIT | Total including LUCF | All GHG | MtCO2e | 1974 | N/A |
| World | CAIT | Total including LUCF | All GHG | MtCO2e | 1975 | N/A |
| World | CAIT | Total including LUCF | All GHG | MtCO2e | 1976 | N/A |
| World | CAIT | Total including LUCF | All GHG | MtCO2e | 1977 | N/A |
| World | CAIT | Total including LUCF | All GHG | MtCO2e | 1978 | N/A |
| World | CAIT | Total including LUCF | All GHG | MtCO2e | 1979 | N/A |
| World | CAIT | Total including LUCF | All GHG | MtCO2e | 1980 | N/A |
| World | CAIT | Total including LUCF | All GHG | MtCO2e | 1981 | N/A |
| World | CAIT | Total including LUCF | All GHG | MtCO2e | 1982 | N/A |
| World | CAIT | Total including LUCF | All GHG | MtCO2e | 1983 | N/A |
| World | CAIT | Total including LUCF | All GHG | MtCO2e | 1984 | N/A |
| World | CAIT | Total including LUCF | All GHG | MtCO2e | 1985 | N/A |
| World | CAIT | Total including LUCF | All GHG | MtCO2e | 1986 | N/A |
| World | CAIT | Total including LUCF | All GHG | MtCO2e | 1987 | N/A |
| World | CAIT | Total including LUCF | All GHG | MtCO2e | 1988 | N/A |
| World | CAIT | Total including LUCF | All GHG | MtCO2e | 1989 | N/A |
| World | CAIT | Total including LUCF | All GHG | MtCO2e | 1990 | 34964.58 |
| World | CAIT | Total including LUCF | All GHG | MtCO2e | 1991 | 35125.92 |
| World | CAIT | Total including LUCF | All GHG | MtCO2e | 1992 | 34982.15 |
| World | CAIT | Total including LUCF | All GHG | MtCO2e | 1993 | 35080.3 |
| World | CAIT | Total including LUCF | All GHG | MtCO2e | 1994 | 35283.88 |
| World | CAIT | Total including LUCF | All GHG | MtCO2e | 1995 | 36004.23 |
| World | CAIT | Total including LUCF | All GHG | MtCO2e | 1996 | 36022.1 |
| World | CAIT | Total including LUCF | All GHG | MtCO2e | 1997 | 37338.36 |
| World | CAIT | Total including LUCF | All GHG | MtCO2e | 1998 | 36981.63 |
| World | CAIT | Total including LUCF | All GHG | MtCO2e | 1999 | 36817.13 |
| World | CAIT | Total including LUCF | All GHG | MtCO2e | 2000 | 37438.04 |
| World | CAIT | Total including LUCF | All GHG | MtCO2e | 2001 | 38396.69 |
| World | CAIT | Total including LUCF | All GHG | MtCO2e | 2002 | 39855.92 |
| World | CAIT | Total including LUCF | All GHG | MtCO2e | 2003 | 40703.74 |
| World | CAIT | Total including LUCF | All GHG | MtCO2e | 2004 | 42477.66 |
| World | CAIT | Total including LUCF | All GHG | MtCO2e | 2005 | 43360.31 |
| World | CAIT | Total including LUCF | All GHG | MtCO2e | 2006 | 43739.49 |
| World | CAIT | Total including LUCF | All GHG | MtCO2e | 2007 | 44590.03 |
| World | CAIT | Total including LUCF | All GHG | MtCO2e | 2008 | 44953.73 |
| World | CAIT | Total including LUCF | All GHG | MtCO2e | 2009 | 44907.04 |
| World | CAIT | Total including LUCF | All GHG | MtCO2e | 2010 | 46637.83 |
| World | CAIT | Total including LUCF | All GHG | MtCO2e | 2011 | 47915.71 |
| World | CAIT | Total including LUCF | All GHG | MtCO2e | 2012 | 48477.53 |
| World | CAIT | Total including LUCF | All GHG | MtCO2e | 2013 | 49037.46 |
| World | CAIT | Total including LUCF | All GHG | MtCO2e | 2014 | 49494.56 |
| World | CAIT | Total including LUCF | All GHG | MtCO2e | 2015 | 49828.88 |
| World | CAIT | Total including LUCF | All GHG | MtCO2e | 2016 | 49312.19 |
| World | CAIT | Total including LUCF | All GHG | MtCO2e | 2017 | 49947.42 |
| World | CAIT | Total including LUCF | All GHG | MtCO2e | 2018 | N/A |
| World | CAIT | Total including LUCF | All GHG | MtCO2e | 2019 | N/A |
We observe that we don’t have values for years before 1990 neither after 2017. Let’s plot the timeserie:
ghg_emissions_wri_CAIT %>%
filter(year >= 1990 & year < 2017) %>%
plot_ly() %>%
add_trace(y = ~value,
x = ~year,
marker = list(color = "gray"),
type = 'scatter',
# type = "line",
mode = 'lines+markers',
orientation = "v") %>%
layout(title = "World GHG emissions (source: WRI - CAIT)",
yaxis = list(title = "GHG emissions"),
xaxis = list(title = "Years"))# read co2 data
ghg_emissions_owid= read.csv("https://raw.githubusercontent.com/owid/co2-data/master/owid-co2-data.csv",
encoding = "UTF-8")
ghg_emissions_owid_world = ghg_emissions_owid %>%
filter(country == "World")-Data description:
ghg_emissions_owid_world %>%
# filter(year >= 1990 & country == "World") %>%
plot_ly() %>%
add_trace(y = ~co2,
x = ~year,
# marker = list(color = "gray"),
type = 'scatter',
# type = "line",
mode = 'lines+markers',
orientation = "v",
hoverinfo = 'text',
text = ~paste('</br> Year: ', year,
'</br> Value: ', co2,
'</br> Gas: ', "CO2",
'</br> Sector: ', "All",
'</br> Source: ', "Ourw World In Data")) %>%
layout(title = "CO2 emissions (source: Our World In Data)",
yaxis = list(title = "CO2 emissions"),
xaxis = list(title = "Years")) | Column name | Type | Description |
|---|---|---|
| data.source | string | |
| data.provider | string | |
| geo.scale | string | |
| geo.code.iso2c | string | |
| geo.code.iso3c | string | |
| geo.name | string | |
| year | numeric | |
| sector | string | |
| gas | string | |
| value | numeric | |
| unit | string |
# create dataset
OGS_ghg_emission = data.frame(data.source = as.character(),
data.provider = as.character(),
geo.scale = as.character(),
geo.code.iso2c = as.character(),
geo.code.iso3c = as.character(),
geo.name = as.character(),
year = as.numeric(),
sector = as.character(),
gas = as.character(),
value = as.numeric(),
unit = as.character())OGS.MAP.WB = function(Worldbank_data, start_date, end_date, geoscale){
Worldbank_data_OGS = Worldbank_data %>%
add_column(data.source = "World.Bank",
data.provider = "World.Bank",
geo.scale = geoscale,
sector = "All",
gas = "All",
geo.code.iso3c = NA,
unit = "MtCO₂e") %>%
rename(geo.code.iso2c = iso2c,
geo.name = country,
value = EN.ATM.GHGT.KT.CE) %>%
select(data.source, data.provider, geo.scale, geo.code.iso2c, geo.code.iso3c, geo.name,
year, sector, gas, value) %>%
filter(year >= start_date & year <= end_date) %>%
mutate(value = value * 0.001)
return(Worldbank_data_OGS)
}
Worldbank_data_OGS = OGS.MAP.WB(ghg_emissions_wb_world,
start_date = 1970,
end_date = 2012,
geoscale = "World")OGS.MAP.WRI.CAIT = function(wri_data, start_date, end_date, geoscale){
wri_data_OGS = wri_data %>%
add_column(data.provider = "WRI.CAIT",
geo.scale = geoscale,
sector = "All",
geo.code.iso3c = NA,
geo.code.iso2c = NA,
unit = "MtCO₂e") %>%
rename(data.source = Data.source,
geo.name = Country,
gas = Gas,
value = value) %>%
select(data.source, data.provider, geo.scale, geo.code.iso2c, geo.code.iso3c, geo.name,
year, sector, gas, value) %>%
filter(year >= start_date & year <= end_date) %>%
mutate_at("value" , as.numeric)
return(wri_data_OGS)
}
wri_data_OGS = OGS.MAP.WRI.CAIT(ghg_emissions_wri_CAIT,
start_date = 1990,
end_date = 2016,
geoscale = "World")OGS.MAP.OWID = function(owid_data, geoscale){
owid_data_OGS = owid_data %>%
add_column(data.provider = "OWID",
data.source = "OWID",
geo.scale = geoscale,
sector = "All",
geo.code.iso2c = NA,
unit = "MtCO₂",
gas = "CO2") %>%
rename(geo.code.iso3c = iso_code,
geo.name = country,
value = co2) %>%
select(data.source, data.provider, geo.scale, geo.code.iso2c, geo.code.iso3c, geo.name,
year, sector, gas, value)
return(owid_data_OGS)
}
owid_data_OGS = OGS.MAP.OWID(ghg_emissions_owid_world,
geoscale = "World")OGS_ghg_emission = bind_rows(Worldbank_data_OGS,
wri_data_OGS,
owid_data_OGS)
# plot timeserie
OGS_ghg_emission %>%
filter(year >= 1990) %>%
plot_ly() %>%
add_trace(y = ~value,
x = ~year,
color = ~data.provider,
type = 'scatter',
# type = "line",
mode = 'lines+markers',
orientation = "v",
hoverinfo = 'text',
text = ~paste('</br> Year: ', year,
'</br> Value: ', value,
'</br> Gas: ', gas,
'</br> Sector: ', sector,
'</br> Source: ', data.provider)) %>%
layout(title = "World GHG emissions",
yaxis = list(title = "GHG emissions (MtCO₂)"),
xaxis = list(title = "Years"))# wb fr mapping
#################################
ghg_emissions_wb_fr = ghg_emissions_wb %>%
filter(country == "France")
Worldbank_data_OGS_fr = OGS.MAP.WB(ghg_emissions_wb_fr,
start_date = 1970,
end_date = 2012,
geoscale = "Country")
# WRI - CAIT fr mapping
####################################
ghg_emissions_wri_CAIT_fr = ghg_emissions_wri %>%
# select all world data & all gases data & total sector
filter(Data.source == "CAIT",
Country == "France",
Gas == "All GHG",
Sector == "Total including LUCF") %>%
# pivot data
pivot_longer(
cols = starts_with("X"),
names_to = "year",
names_prefix = "X",
values_to = "value") %>%
mutate_at("year" , as.numeric) %>%
arrange(year)
wri_data_OGS_fr = OGS.MAP.WRI.CAIT(ghg_emissions_wri_CAIT_fr,
start_date = 1990,
end_date = 2016,
geoscale = "Country")
# WRI UNFCCC_AI
###############################
ghg_emissions_wri_UNFCCC_AI_fr = ghg_emissions_wri %>%
# select all world data & all gases data & total sector
filter(Data.source == "UNFCCC_AI",
Gas == "Aggregate GHGs",
Sector == "Total GHG emissions with LULUCF",
Country == "France") %>%
# pivot data
pivot_longer(
cols = starts_with("X"),
names_to = "year",
names_prefix = "X",
values_to = "value") %>%
mutate_at("year" , as.numeric) %>%
arrange(year)
OGS.MAP.WRI.UNFCCC = function(wri_data, start_date, end_date, geoscale){
wri_data_OGS = wri_data %>%
add_column(data.provider = "WRI.UNFCCC",
geo.scale = geoscale,
sector = "All",
geo.code.iso3c = NA,
geo.code.iso2c = NA,
unit = "MtCO₂e") %>%
rename(data.source = Data.source,
geo.name = Country,
gas = Gas,
value = value) %>%
select(data.source, data.provider, geo.scale, geo.code.iso2c, geo.code.iso3c, geo.name,
year, sector, gas, value) %>%
filter(year >= start_date & year <= end_date) %>%
mutate_at("value" , as.numeric)
return(wri_data_OGS)
}
wri_UNFCCC_data_OGS_fr = OGS.MAP.WRI.UNFCCC(ghg_emissions_wri_UNFCCC_AI_fr,
start_date = 1990,
end_date = 2016,
geoscale = "Country")
# bind rows
################################
OGS_ghg_emission_fr = bind_rows(Worldbank_data_OGS_fr,
wri_data_OGS_fr,
wri_UNFCCC_data_OGS_fr)
# plot timeserie
################################
OGS_ghg_emission_fr %>%
filter(year >= 1990) %>%
plot_ly() %>%
add_trace(y = ~value,
x = ~year,
color = ~data.provider,
type = 'scatter',
# type = "line",
mode = 'lines+markers',
orientation = "v",
hoverinfo = 'text',
text = ~paste('</br> Year: ', year,
'</br> Value: ', value,
'</br> Gas: ', gas,
'</br> Sector: ', sector,
'</br> Source: ', data.provider)) %>%
layout(title = "France GHG emissions",
yaxis = list(title = "GHG emissions (MtCO₂)"),
xaxis = list(title = "Years"))